package com.demo.gulimall.seckill.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 秒杀商品通知订阅
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sms_seckill_sku_notice")
public class SeckillSkuNotice implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** member_id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`member_id`")
	private Long memberId;

	/** sku_id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`sku_id`")
	private Long skuId;

	/** 活动场次id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`session_id`")
	private Long sessionId;

	/** 订阅时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`subcribe_time`")
	private Date subcribeTime;

	/** 发送时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`send_time`")
	private Date sendTime;

	/** 通知方式[0-短信，1-邮件] */
	@TableField(value = "`notice_type`")
	private Byte noticeType;

}
